﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common.Entity;
using System.Data;
using Common.Core.Cache;

namespace Common.Business
{
    public class ExtProperty
    {
        public List<ExtPropertyData> GetList()
        {
            if (MemoryStorageManager<MemoryStorage, List<ExtPropertyData>>.Instance["ExtendedPro"] == null)
            {
                DataTable dt = Common.Core.Data.IDataSourceTypeFactory.Create().ExecuteTable("select code from gatherinfo");
                List<ExtPropertyData> list = Common.Core.Data.ORMHelper.TbToModelList<ExtPropertyData>(dt);

                MemoryStorageManager<MemoryStorage, List<ExtPropertyData>>.Instance["ExtendedPro"] = list;
            }
            return MemoryStorageManager<MemoryStorage, List<ExtPropertyData>>.Instance["ExtendedPro"];
        }
    }
}
